<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/WEB-INF/templates/default.xhtml">

	<ui:define name="menu">
		<ul>
			<li><h:link value="Home"  outcome="/index" /> </li>
			<li><h:link class="akt" value="Users"  outcome="/content/user/list" /> </li>
			<li><h:link value="Resources"  outcome="/content/resource/list" /> </li>
			<li><h:link value="Tasks"  outcome="/content/task/list" /> </li>
		    <li><h:link value="Task types"  outcome="/content/tasktype/list" /> </li> 
		</ul>
		<p class="vonal"><br/></p>
	</ui:define>

	<f:metadata>
		<f:viewParam name="id" value="#{userBean.id}" />
		<f:event type="preRenderView" listener="#{userBean.retrieve}" />
	</f:metadata>

	<ui:define name="content2">
		<h:form id="userEditForm">
			<h:panelGrid columns="3" cellpadding="0" cellspacing="20">
				<h:outputLabel for="username" value="Username: " />
				<h:inputText id="username" style="background-color:#F5FFFA"
					value="#{userBean.user.username}" />
				<h:message for="username" styleClass="error" errorStyle="color:red" />

				<h:outputLabel for="name" value="Name: " />
				<h:inputText id="name" style="background-color:#F5FFFA"
					value="#{userBean.user.name}" />
				<h:message for="name" styleClass="error" errorStyle="color:red" />

				<h:outputLabel for="email" value="Email: " />
				<h:inputText id="email" style="background-color:#F5FFFA"
					value="#{userBean.user.email}" />
				<h:message for="email" styleClass="error" errorStyle="color:red" />

				<h:outputLabel for="phoneNumber" value="Phone number: " />
				<h:inputText id="phoneNumber" style="background-color:#F5FFFA"
					value="#{userBean.user.phoneNumber}" />
				<h:message for="phoneNumber" styleClass="error"
					errorStyle="color:red" />

				<h:commandButton value="Save" action="#{userBean.update}"
					style="background-color:#F5FFFA; width: 100px;" />

				<h:button value="Back" outcome="/content/user/list"
					style="background-color:#F5FFFA; width: 100px;" />
				<h:outputLabel value=" " />
			</h:panelGrid>



		</h:form>

	</ui:define>
</ui:composition>